/**
 * 总控台  商户中心，底部统计数
 */

const summerss = require('../module/summerss.js')
module.exports = {
    //统计本月商户数
    sumorder: (req, res, next) => {
        summerss.sumorder().then(results => {
            req.ors = results.ors
            next()
        }).catch(err => {
            next(err)
        })
    },

    //统计接单员  总数
    sumendorder: (req, res, next) => {
        summerss.sumendorder().then(resus => {
            req.ops = resus.ops
            next()
        }).catch(err => {
            next(err)
        })
    },

    //统计商户 商户数
    sumorpay: (req, res, next) => {
        summerss.sumorpay().then(resuls => {
            req.oms = resuls.oms
            next()
        }).catch(err => {
            next(err)
        })
    }


}